package com.jse.entity;

import org.springframework.stereotype.Component;
import org.springframework.web.context.ContextLoader;

@Component
public class Ioc {

	public Object get(String name) {
		return ContextLoader.getCurrentWebApplicationContext().getBean(name);
	}
	public <T> T get(String name,Class<T> clazz) {
		return ContextLoader.getCurrentWebApplicationContext().getBean(name,clazz);
	}
}
